<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="wrap">
        <button class="btn">删除</button>
        <ul class="list one" title="">
            <li id="first1">01</li>
            <li class="second">02</li>
            <li>03</li>
            <li name="last">04</li>
        </ul>
    </div>
</body>
<script>
    var btn = document.getElementsByClassName("btn")[0];
    var one = document.querySelector(".one");
    var first1 = document.querySelector("#first1");
    var second = document.querySelector(".second");

    //节点的克隆
    //Element.cloneNode(bool)
    //Element.cloneNode(false) 默认false只克隆当前元素及其相关属性 =>  但是并不克隆子内容
    //Element.cloneNode(true)  既克隆当前元素及其相关属性 又克隆子内容

    btn.onclick = function(){
        var cloneUl = one.cloneNode(true);
        console.log(cloneUl);

        wrap.appendChild(cloneUl);
    }
</script>
</html>